package contegor.scire.core;


/**
 * {@link Task} used to notify a {@link Container} the number of external {@link Link} that
 * points out one of its {@link Identifiable}.
 *
 * @version $Revision$
 * @author  Héctor Cirbián Pousa ($Author$)
 */
@Version("$Id: TrackExternalLink.java,v 1.2 2010-02-01 10:55:41 hector Exp $")
public class SetExternalLinksToTrack extends TaskImpl<Void> {
  private static final long serialVersionUID = -914794960395853518L;

  private IdFragment target;
  private Id         externalContainerId;
  private int        references;

  public SetExternalLinksToTrack(TaskId taskId, Id targetContainerId, IdFragment target, Id externalContainerId, int references) {
    super(taskId, targetContainerId);
    this.target              = target;
    this.externalContainerId = externalContainerId;
    this.references          = references;
  }

  public void process(Container container) throws MissingElementException {
    container.setTrackedExternalLinks(target, externalContainerId, references);
  }
}
